#include <string>
#include <map>

class Connection
{

    public:
        Connection();
        ~Connection();
        // Creates a connection
        int create(const std::string &IP, unsigned port);
        // Joins a connection
        int join(const std::string &IP, unsigned port);
        // Send a message to a connection
        // returns 0 on success
        int send(std::map<std::string,std::string>& msg);
        // Recieve a message to a connection
        // returns 0 on success
        // This blocks until a message is recieved
        int recieve(std::map<std::string,std::string>& msg);

    private:
        Connection(const Connection& noCopy);
        Connection& operator=(const Connection& noCopy);
};
